<template>
	<view class="formlist">
		<view class="formgroup  padding-17 border-bottom-E3E3E5">
			<view class="labletitletar">
				<label>{{label}}</label>
				<text class="required" v-show="required">*</text>
			</view>
			<view class="controlvalue  uni-textarea">
				<textarea auto-height placeholder-style="fontSize: 28rpx" :placeholder="placeholder" :maxlength="maxlength"
					  v-model="valueTitle" :disabled="disabled" @input='input'/>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			value:'',
			disabled:{
				type:Boolean,
				default(){
					return false
				}
			},
			type:{
				type:String,
				default(){
					return ''
				}
			},
			label:{
				type:String,
				default(){
					return ''
				}
			},
			maxlength:{
				type:Number,
				default(){
					return 50
				}
			},
			placeholder:{
				type:String,
				default(){
					return '请输入'
				}
			},
			showLabel:{
				type:Boolean,
				default(){
					return true
				}
			},
			required:{
				type:Boolean,
				default(){
					return false
				}
			}
		},
		data() {
			return {
				controlProerty:{
					maxlength:50
				},
				valueTitle:this.value
			};
		},
		watch:{
			value(val){
				this.valueTitle = val
			}
		},
		methods:{
			input(e){
				// console.log(e)
				this.valueTitle = e.detail.value;
				this.$emit('input',this.valueTitle)
			}
		}
	}
</script>

<style>
	.required{
		color: red;
	}
</style>
